﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using DAL;

public partial class My : System.Web.UI.Page
{
    protected string pagecount;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["uid"] == null)
                Response.Redirect("auth.aspx?back=My");
            pagecount = new IdeaService().GetIdeaListCountByUser(Session["uid"].ToString());
            if (int.Parse(pagecount) == 0)
            {
                NewIdea.Visible = true;
                Emptylbl.Text = "Light up your mind please.";
            }
            else
            {
                NewIdea.Visible = false;
                Emptylbl.Visible = false;
            }
        }
    }
}
